<?php

namespace App;

use Illuminate\Database\Eloquent\Model;

/**
 * App\BrokersZS
 *
 * @property int $id
 * @property string|null $name
 * @property string|null $telephone
 * @property string|null $atvar
 * @property string|null $compony
 * @property string|null $is_agent
 * @property \Illuminate\Support\Carbon|null $created_at
 * @property \Illuminate\Support\Carbon|null $updated_at
 * @method static \Illuminate\Database\Eloquent\Builder|\App\BrokersZS whereAtvar($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\BrokersZS whereCompony($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\BrokersZS whereCreatedAt($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\BrokersZS whereId($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\BrokersZS whereIsAgent($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\BrokersZS whereName($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\BrokersZS whereTelephone($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\BrokersZS whereUpdatedAt($value)
 * @mixin \Eloquent
 */
class BrokersZS extends Model
{
    //
    protected  $table='brokers_zs';

    public static function getSelectOptions()
    {
        $options = \DB::table('brokers_zs')->select('id','name as text')->get();
        $selectOption = [];
        foreach ($options as $option){
            $selectOption[$option->id] = $option->text;
        }
        return $selectOption;
    }
}
